// 引入全部图标
// import * as Icons from "@element-plus/icons"

// 按需引入图标
import {
  CloseBold,
  Close,
  Plus,
  Star,
  UserFilled,
  Loading,
  Connection,
  Edit,
  FolderOpened,
  MessageBox,
  CaretBottom,
  Expand,
  Fold
} from '@element-plus/icons'

const dictIcon = {
  'CloseBold': CloseBold,
  'Close': Close,
  'Plus': Plus,
  'Star': Star,
  'UserFilled': UserFilled,
  'Loading': Loading,
  'Connection': Connection,
  'Edit': Edit,
  'FolderOpened': FolderOpened,
  'MessageBox': MessageBox,
  'CaretBottom': CaretBottom,
  'Expand': Expand,
  'Fold': Fold
}

const installIcon = (app) => {
  // 便于模板获取
  app.config.globalProperties.$icon = dictIcon
  // 使用全部图标
  // app.config.globalProperties.$icon = Icons
}

export default installIcon